package com.superme.common.enums;

/**
 * 描述: 异常状态码枚举类
 * 作者: yanruizhi
 * 时间: 2023/5/31 16:59
 */
public enum ExceptionCodeEnum {
    //参数异常10开头
    PARAMETER_NULL(1001,"参数为空"),


    //未查询到数据 20开头
    DATA_NULL(2001,"该条数据不存在或已被其他管理员修改"),
    DATA_NULL_LIST(2002,"未查询到数据"),

    //登录异常 30开头
    AUTHENTICATION_FAILED(3001, "认证失败"),
    ACCESS_DENIED(3002, "鉴权异常"),

    //文件上传下载异常
    FILE_EXCEPTION(4000, "文件上传异常"),
    FILE_INFO_NOT_FOUND(4001, "文件不存在"),
    FILE_OBJECT_NOT_FOUND(4002, "文件对象不存在"),
    // 文件类型异常
    BUCKET_NOT_FOUND(4101, "bucket不存在"),

    // 消息队列异常
    OUT_OF_MAX_TIME(5001, "延时消息时间超出最大限制"),
    OUT_OF_BOUND_TIME(5002, "延时消息时间范围错误"),

    // 业务异常
     BUSINESS_EXCEPTION(9999, "业务异常")
    ;
    private Integer code;
    private String message;

    ExceptionCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
